<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="shiyue" uri="http://www.shiyue.com" %>
<%
String path = request.getContextPath();
%>
<html>
  <head>
    <title>日志查看</title>
    <link href="<%=path %>/css/index_css.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="<%=path %>/css/paging.css">
    <script src="<%=path%>/js/resizeIframe.js" type="text/javascript"></script>
    <script src="<%=path%>/js/syAjax.js" type="text/javascript"></script>
    <script language="javascript" src="<%=path %>/js/paging.js"></script>
	<script type="text/JavaScript">
	var pageInfo = ${shiyue:toJSONWithExclude(pageInfo, "class,pageData")};
	window.onload   =   function(){
		parent.location.hash="top";
		var queryTitle = document.getElementById('UserName').value;    
        queryTitle=encodeURI(queryTitle);queryTitle=encodeURI(queryTitle);
		var objURL="";
		objURL= "<%=path%>/findLoginLogByUserNameUserAction.action?user.name="+queryTitle;
		paging(objURL,pageInfo);
		resizeIframe();
	};
	</script>
  </head>
  
  <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" align="left" class="f_5">日志查看</td>
  </tr>
   <tr>
    <td height="1" colspan="2" bgcolor="#9DD12E"></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="3" align="left" valign="bottom" background="<%=path%>/images/sywesp_24.gif"></td>
      </tr>
      <tr>
        <td colspan="3" align="left" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1%" height="30" align="left" valign="bottom" background="<%=path%>/images/sywesp_26.gif">&nbsp;</td>
            <td width="87%" align="left" valign="bottom" background="<%=path%>/images/sywesp_26.gif">
            <form action="<%=path %>/findLoginLogByUserNameUserAction.action" method="post" style="margin:0pt 0pt 0pt 0pt; padding:0pt 0pt 0pt 0pt;">
          &nbsp;&nbsp;&nbsp;&nbsp;
                姓名：<input type="text" id="UserName" name="user.name" value="${requestScope.UserName }">&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="查询">
                </form>
            </td>
            <td width="12%" align="right" valign="bottom" background="<%=path%>/images/sywesp_26.gif">&nbsp;&nbsp;</td>
          </tr>
          <tr>
            <td height="30" colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="2" height="24" align="left" background="<%=path%>/images/sywesp_21.gif"><img src="<%=path%>/images/sywesp_20.gif" width="2" height="24" /></td>
                              <td align="left" background="<%=path%>/images/sywesp_21.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="12%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />序号</td>
                                    <td width="30%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />帐号：名称</td>
                                    <td width="10%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />登录ip</td>
                                    <td width="38%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />登录时间</td>
                                    <td width="10%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />状态</td>
                                    </tr>
                              </table></td>
                              <td width="4" align="right" background="<%=path%>/images/sywesp_21.gif"><img src="<%=path%>/images/sywesp_22.gif" width="4" height="24" /></td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td height="25" align="left" valign="top" class="tb_7"><table width="100%" border="0" cellspacing="1" cellpadding="0">
                              	<c:forEach items="${requestScope.loginLogList}" var="loginLog" varStatus="s">
                                  <tr>
                                    <td width="12%" height="25" align="left" valign="bottom">&nbsp;&nbsp;${s.count}</td>
                                    <td width="30%" align="left" valign="bottom">&nbsp;&nbsp;${loginLog.user.account}:${loginLog.user.name }</td>
                                    <td width="10%" align="left" valign="bottom" nowrap="nowrap">&nbsp;&nbsp;${loginLog.ip }</td>
                                    <td width="38%" align="left" valign="bottom" nowrap="nowrap">&nbsp;&nbsp;<fmt:formatDate value="${loginLog.time }" pattern="yyyy-MM-dd hh:mm:ss"/></td>
                                    <td width="10%" align="left" valign="bottom" nowrap="nowrap">&nbsp;&nbsp;
                                    <c:if test="${loginLog.loginResult}">
                                    	<font color='green'>成功</font>
                                    </c:if>
                                       <c:if test="${!loginLog.loginResult}">
                                    	<font color='red'>失败</font>
                                    </c:if>
                                    
                                    </td>
                                  </tr>
                                 </c:forEach>
                              </table></td>
                            </tr>
                          </table>
                            </td>
                      </tr>
                  </table></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td width="61%" height="30" align="center" bgcolor="#F7F7F7"><shiyue:paging/></td>
        <td width="34%" align="right" bgcolor="#F7F7F7">&nbsp;</td>
        <td width="5%" align="center" bgcolor="#F7F7F7">&nbsp;</td>
      </tr>
      <tr>
        <td height="30" colspan="3" align="right" valign="bottom" background="<%=path%>/images/sywesp_28.gif">&nbsp;&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
  </body>
</html>
